import java.util.Scanner;

public class a053_計分程式 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int correct;
		int sum;
		
		while(sc.hasNext()) {
			correct = sc.nextInt();
			
			sum = 0;			
			if(correct <= 0 || correct <= 10)
				sum += 6 * correct;
			else if(correct < 10 || correct <= 20)
				sum += 60 + 2 * ( correct - 10 );
			else if(correct < 20 || correct < 40)
				sum += 60 + 20 + 1 * ( correct - 20 );
			else
				sum += 100;				
			
			System.out.println(Integer.toString(sum));
		}
	}
	
}